package formbeans;

import java.util.ArrayList;
import java.util.List;

import org.mybeans.form.FormBean;

public class BasicAnswerForm extends FormBean {

	private String answer;
	
	public String getAnswer() {
		return answer;
	}

	public void setAnswer(String answer) {
		this.answer = trimAndConvert(answer,"<>\"");
	}
	
	public List<String> checkBasicAnswerFormErrors(){
		List<String> errors = new ArrayList<String>();
		
		if(answer == null || answer.length() == 0){
			errors.add("Please enter an answer");
		}
		
		return errors;
	}
}